/*
 * Class discribles for one account
 */


/**
 *
 * @author luan
 */
import java.io.*;
public class Account implements Serializable {
   int accountNumber; // number of the account
   String firstName; //
   String lastName;
   double accountbalance; // the balance of the account
    /** Creates a new instance of Account */
   public Account()
   {
    accountNumber=0;
    firstName="";
    lastName="";
    accountbalance=0;
   }
   public Account(int accNo,String fName,String lName,double bal)
   {
        this.accountNumber=accNo;
        this.firstName=fName;
        this.lastName=lName;
        this.accountbalance=bal;
   }
   // deposit menthod
   public void deposit(double amount)
   {
        this.accountbalance+=amount;
   }
   //withdraw menthod
   public void withdraw(double amount)
   {
   this.accountbalance-=amount;
   }
   //getter and setter
   public int getAccountNumber(){
        return accountNumber;
    }

    public String getFirstName() {
        return firstName;
    }

    public String getLastName() {
        return lastName;
    }

    public double getAccountBalance() {
        return accountbalance;
    }

    public void setAccountNumber(int accountNumber) {
        this.accountNumber = accountNumber;
    }

    public void setAccountBalance(double accountBalance) {
        this.accountbalance = accountBalance;
    }

    public void setFirstName(String firstName) {
        this.firstName = firstName;
    }

    public void setLastName(String lastName) {
        this.lastName = lastName;
    }

    public String toString(){
        return "["+accountNumber +","+firstName +","+lastName+","+accountbalance+"]";
    }
}
